<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
		<meta charset="UTF-8">
		<title>修改管理员密码</title>
	</head>
	<body>
		<div align="center" style="background-color: white;width: 998px; height: 490px;">
			<hr>
			 	 修改密码
			<hr />
			<form id="form1" action="/TestManagementSystem/admin/studentServlet/updateStudentPwd">
			 <div>
			 	<br >
			 	<table >
			 		<tr>
			 			<td>
			 				 　旧密码：&nbsp;&nbsp;<input type="password" name="studentPwd" /><br><br><br>
			 			</td>
			 		</tr>
			 		<tr>
			 			<td>
			 				 　新密码：&nbsp;&nbsp;<input type="password" name="newPwd" /><br><br><br>
			 			</td>
			 		</tr>
			 		<tr>
			 			<td>
			 				 确认密码：&nbsp;&nbsp;<input type="password" name="newPwd1" /><br><br><br>
			 			</td>
			 		</tr>
			 		<tr>
			 			<td >　　　　
			 				<input type="submit" value="  修改   "  />
			 				<input type="reset" value="  重置   "  />
			 			</td>
			 		</tr>
			 	</table>
			   </div>
			   </form>
			</div>
	</body>
	<script type="text/javascript" src="/TestManagementSystem/js/jquery-1.4.1.js" ></script>
	<script type="text/javascript">
		$(function(){	
			//表单验证
			$.extend({
				"yz":function(studentAccount,studentPwd,newPwd,newPwd1){
					$(".sp").remove();
					if(studentAccount.val().length==0){
						studentAccount.after("<span class='sp'>账号不能为空</span>");
						$(".sp").css("color","red");
						return false;
					}
					if(studentPwd.val().length==0){
						studentPwd.after("<span class='sp'>旧密码不能为空</span>");
						$(".sp").css("color","red");
						return false;
					}
					if(newPwd.val().length==0){
						newPwd.after("<span class='sp'>新密码不能为空</span>");
						$(".sp").css("color","red");
						return false;
					}
					if(newPwd1.val().length==0){
						newPwd1.after("<span class='sp'>确认密码不能为空</span>");
						$(".sp").css("color","red");
						return false;
					}
					return true;
				}
			});
			//绑定提交验证
			$("#form1").bind("submit",function(){
				return $.yz($("input[name=studentAccount]"),$("input[name=studentPwd]"),$("input[name=newPwd]"),$("input[name=newPwd1]"));
			});
		});
	</script>
</html>